projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66191b7
)
(PTR_TO_OFFSET): Alternate definition if not `emacs'.
author
Richard M. Stallman
<rms@gnu.org>
Tue, 9 Jun 1998 20:12:44 +0000
(20:12 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Tue, 9 Jun 1998 20:12:44 +0000
(20:12 +0000)
src/regex.c
patch
|
blob
|
history
diff --git
a/src/regex.c
b/src/regex.c
index 2a260376833ccfc52857b9ba3ebc13f80a68c4bd..e4422ce93833f82c68f3b53394474d802ac116d1 100644
(file)
--- a/
src/regex.c
+++ b/
src/regex.c
@@
-27,11
+27,15
@@
#undef _GNU_SOURCE
#define _GNU_SOURCE
+#ifdef emacs
/* Converts the pointer to the char to BEG-based offset from the start. */
#define PTR_TO_OFFSET(d) \
POS_AS_IN_BUFFER (MATCHING_IN_FIRST_STRING \
? (d) - string1 : (d) - (string2 - size1))
#define POS_AS_IN_BUFFER(p) ((p) + (NILP (re_match_object) || BUFFERP (re_match_object)))
+#else
+#define PTR_TO_OFFSET(d) 0
+#endif
#ifdef HAVE_CONFIG_H
#include <config.h>